import {getWithinAuth} from '../../frame/ajax'
import {getUrl} from '../../frame/api'

// 加载合伙人信息
export const loadBookInfo = ({ dispatch }) => {
  return new Promise(
    (resolve, reject) => {
      getWithinAuth({
        url: getUrl('reader_load_info')
      }).then(
        function (ret) {
          console.log('bookInfo', ret);
          dispatch('READER_INFO', ret);
          resolve()
        },
        function (err) {
          reject(err)
        }
      )
    }
  )
}
